package menu.action;

import java.util.ArrayList;
import java.util.List;
import menu.model.MenuItem;
import menu.service.*;

import com.opensymphony.xwork2.ActionSupport;

public class Show extends ActionSupport {

	private static final long serialVersionUID = 1L;
	
	private MenuManager menuManager;
	
	private List<MenuItem> menu;
	
	public String execute() throws Exception
	{

		List<MenuItem> listMenu = menuManager.getAllMenuItems();
		setMenu(listMenu);
		return SUCCESS;
	}

	public MenuManager getMenuManager() {
		return menuManager;
	}

	public void setMenuManager(MenuManager menuManager) {
		this.menuManager = menuManager;
	}

	public List<MenuItem> getMenu() {
		return menu;
	}

	public void setMenu(List<MenuItem> menu) {
		this.menu = menu;
	}

}
